/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from '../utils';
import type { TableListItem } from '@/pages/kdy/cashOut/index.d';
import Mock from 'mockjs';

const Random = Mock.Random;
export default {
  'POST /Inn/blackListCourier': (req: Request, res: Response) => {
    const data: TableListItem[] = Mock.mock({
      'list|1-30': [
        {
          id: '@id()',
          kb_id: '@id()',
          realname: Random.cname(),
          register_acive_time: Random.date(),
          username: '@id()',
          index_shop_name: Mock.mock('@county(true)'),
          'brand|1': ['yt', 'sto'],
          'order_sum|1-100': 100,
          'is_login|1-2': 2, // 2关闭 1开启
          'is_withdraw|1-2': 2,
          remarks: '备注',
        },
      ],
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data,
    };
    return res.json(result);
  },
  'POST /Inn/blackCourierSet': (req: Request, res: Response) => responseSuccess(req, res),
};
